#pragma once
#include "SerializaReadWrite.h"
#include <boost/asio.hpp>
#include <memory>
#include <string>

namespace UTILS {
class Session;
class AppBase : public std::enable_shared_from_this<AppBase> {
public:
  virtual void start(SerializaReadWritePtr) = 0;
  virtual void stop() = 0;
  virtual ~AppBase() = default;
  virtual void handle_read(std::string) = 0;
  virtual void handle_write(const boost::system::error_code &) = 0;

protected:
  std::shared_ptr<Session> m_session_;
};
} // namespace UTILS